gnttab/ARM: don't corrupt shared GFN array
authorJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2018 13:04:44 +0000 (14:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2018 13:04:44 +0000 (14:04 +0100)
commit9d2f8f9c65d4da35437f50ed9e812a2c5ab313e2
treea35bbf714269971d0bb46e3c2122d017e8911079
parentd798a0952903db9d8ee0a580e03f214d2b49b7d7
gnttab/ARM: don't corrupt shared GFN array

... by writing status GFNs to it. Introduce a second array instead.
Also implement gnttab_status_gmfn() properly now that the information is
suitably being tracked.

While touching it anyway, remove a misguided (but luckily benign) upper
bound check from gnttab_shared_gmfn(): We should never access beyond the
bounds of that array.

This is part of XSA-255.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/grant_table.c
xen/include/asm-arm/grant_table.h
xen/include/asm-x86/grant_table.h